
//更新裁剪过后的课程封面
function cut_CourseImage(url){
	// 判断当前是否已经上传过图片
	var courseImg = $("#course_Image").val();
	var btnCss = "uploadBtn_courseTitle";
	var number = "";
	if (courseImg != "") {
		btnCss = "setedit_editico";
		number = "1";
	}
	
	$("#course_Image").val(url);
	$(".singlePhoto>img").attr("src",url);
	if (btnCss == "uploadBtn_courseTitle") {
		
		// 上传成功改变上传的Css样式
		$(".singlePhoto").css("border","1px solid #ccc");
		$(".singlePhoto>img").addClass(Constants._layerShow);
		$(".singlePhoto>img").show();
		
		$("#_uploadCourseImageDiv").removeClass("uploadBtn_courseTitle");
		$("#_uploadCourseImageDiv").addClass("setedit_editico");
			
	}
	
	$("#tit-p-courseimg").prev().remove();
	$("#tit-p-courseimg").before('<span class="rightico"></span>');

	if(number ==""){
		 $.ajax({
			 type:"post",
			 url:basePath+"/course/cleanTreeRedis",
 			 data:{"courseId" : $("#courseId").val()},
			      dataType:'json',
			      success:function(data){
			      	
			    }
		 });							
	}
	updateCourse("img",url);//完成之后 修改
}

//更新裁剪过后的教师团队头像
function cut_CourseTeacherImage(data){
	//新增图片改变样式
	var url=data.filePath;
	var id=data.teacherId;
	
	
	var value=$("#firstStep_courseInstructorImg-"+id).attr("src");
	
	if(value=="" || value==null || value==undefined){
		
		$("#information-div-"+id).find(".manyPhoto").css("border","1px solid #ccc");
		
		$("#firstStep_courseInstructorImg-"+id).show();
		$("#firstStep_courseInstructorImg-"+id).attr("class",Constants._layerShow);
		$("#courseInstructorImgsDiv-"+id).removeClass("uploadBtn_courseInstructor");
		$("#courseInstructorImgsDiv-"+id).addClass("setedit_editico");
		
	}
	
	$("#firstStep_courseInstructorImg-"+id).attr("src",url);
	
	addUpdateCourseInstructor(id,url);
	searchInstructorFull(httpInstructorEN,httpInstructorZH);
}
